Low complexity optimal decimation grid selection in encoding applications

ABSTRACT

A method, executed by an encoding circuit, for selecting an optimal decimated grid includes estimating, among a plurality of decimated grids within a coded block, a weight decimation error for each of a vertical decimated grid and a horizontal decimated grid. A weight decimation error is estimated for each of remaining decimated grids among the plurality of decimated grids based on a corresponding weight decimation error among the vertical decimated grid and the horizontal decimated grid. For each of the plurality of decimated grids, an initial combined error is determined by combining the weight decimation error and a color format choice error. Two decimated grids having the least initial combined errors, among the plurality of decimated grids, are selected as optimal decimated grids.

TECHNICAL FIELD

The present disclosure relates to encoding applications, and moreparticularly, to a mechanism for selecting an optimal decimation grid inan advanced scalable texture compression (ASTC) encoding application.

BACKGROUND

Generally, in image compression, an uncompressed image is processed toobtain a compressed image. The image processing includes application ofone or more algorithms to the uncompressed image. As an example, onesuch algorithm for image compression is joint photographic experts group(JPEG).

One type of image is called a texture map or a texture. A texture map isan image that is applicable to a surface of a two-dimensional orthree-dimensional object (for example, an object that is represented ina virtual space by a wireframe model that includes one or morepolygons). Similar to images, texture maps are compressed using one ormore image compression techniques to obtain compressed textures whichare easily stored in a database or quickly communicated over a network.Advanced scalable texture compression (ASTC) is a standard compressiontechnique and is predominantly used for texture compression.

It is common in computer graphics systems to generate colors forsampling positions in an image to be displayed by applying textures ortexture data to the surfaces to be drawn. For example, surface detail onobjects may be generated by applying a predefined “texture” to a set ofgraphics primitives (such as polygons) representing the object, to givethe rendered image of the object the appearance of the texture. Suchtextures are typically applied by storing an array of texture elementsor “texels,” each representing given texture data (such as color,luminance, or light/shadow values) at a given location (i.e., position),and then mapping the texels onto the corresponding elements, such as aset of sampling positions, for the image to be displayed. The storedarrays of texture elements (i.e., data) are typically referred to astexture maps.

Such arrangements can provide relatively high image quality, but have anumber of drawbacks. In particular, the storage of the texture data andaccessing it in use can lead to higher storage capacity and processingrequirements on a graphics processing device. This is particularlysignificant for power constrained devices, such as mobile phones andother handheld devices that perform graphics processing, as thesedevices are inherently limited in their storage, bandwidth, and powerresources. It is therefore known to encode such texture data in acompressed form so as to reduce the storage and bandwidth that may beimposed on a graphics processing device when using textures.

Texture compression techniques typically determine a reduced set orpalette of colors (or other data) to be used for a given texture map andthen store, for each texture element (texel) in the texture map, anindex into the set or palette of colors that indicates the color to beused for the texture element. This has the advantage that only an index,rather than a full color, value needs to be stored for each texel. Theexisting texture compression techniques use block-based encoding, inwhich the overall array of texture elements to be encoded is dividedinto an array of small blocks (such as blocks of 4×4 texels or 8×8texels), with each such block then encoded (compressed), and decoded,separately. This can help to make the decoding process more efficient,because the decoder, for example, may need to decode only one or a fewof the encoded blocks to determine the value of a texel of interest,rather than the entire encoded texture.

In the conventional mechanisms, the ASTC compression is an offlineencoding system. The ASTC encoder is a block-based, texture compressionstandard. In an ASTC coder/decoder (codec), all texels of a block arerepresented using color endpoints and weights, which is compressed to apre-defined 128 bits with best possible quality. In the current smartphone or tablet market, there are real time ASTC decoders to provide auser with a differentiating gaming experience. In the gaming ecosystem,the need for an ASTC encoder is not much prevalent. But to deploy theASTC compression for the imaging compression context, leads to thedesirability of a real-time ASTC encoder. In an ASTC encoder, a blockmode selection follows a complex and an iterative approach, which is nota viable solution for real-time encoding applications. The block modeselection algorithm is described below.

A best block mode and color endpoint mode (CEM) are selected based onpredefined 128 bits and Min (Weight error [NB]+Color format choice error[CF] criteria), where NB=0, 1, 2, 3 . . . number of blocks and CF=0, 1,2, 3 . . . number of color formats, weight error=(weight decimationerror+weight quantization error), which can fit into predefined 128bits.

There is a need in the art to provide a low-complexity block-modeselection method to handle real-time encoding applications.

SUMMARY

Accordingly, the embodiments herein provide a method, executed by anencoding circuit, for selecting an optimal decimated grid. The methodincludes estimating, among a plurality of decimated grids within a codedblock, a weight decimation error for each of a vertical decimated gridand a horizontal decimated grid. A weight decimation error is estimatedfor each of remaining decimated grids among the plurality of decimatedgrids based on a corresponding weight decimation error among thevertical decimated grid and the horizontal decimated grid. For each ofthe plurality of decimated grids, an initial combined error isdetermined by combining the weight decimation error and a color formatchoice error. Two decimated grids having the least initial combinederrors, among the plurality of decimated grids, are selected as optimaldecimated grids.

The embodiments herein also provide an encoder for selecting an optimaldecimated grid. The encoder includes a decimated weight and quantizationestimation circuit that estimates, among a plurality of decimated gridswithin a coded block, a weight decimation error for each of a verticaldecimated grid and a horizontal decimated grid. A weight decimationerror is estimated for each of remaining decimated grids, among theplurality of decimated grids, based on a corresponding weight decimationerror among the vertical decimated grid and the horizontal decimatedgrid. For each of the decimated grids, an initial combined error isdetermined by combining the weight decimation error and a color formatchoice error. Two decimated grids having the minimum initial combinederrors, among the plurality of decimated grids, are selected as optimaldecimated grids.

The embodiments herein provide a method, executed by an encoder circuit,for selecting an optimal decimated grid. The method includes estimating,with a decimated weight and quantization estimation circuit, a weightdecimation error for each of a vertical decimated grid and a horizontaldecimated grid among a plurality of decimated grids. The decimatedweight and quantization estimation circuit estimates a weight decimationerror for each of remaining decimated grids, among the plurality ofdecimated grids, based on a corresponding weight decimation error amongthe vertical decimated grid and the horizontal decimated grid. Thedecimated weight and quantization estimation circuit computes aquantization error of each weight quantization level on an ideal weightgrid. A color endpoint mode estimation circuit determines a combinederror by combining the weight decimation error, a color format choiceerror, and the quantization error for each the decimated grids. Thecolor endpoint mode estimation circuit selects two optimal colorendpoint modes and block modes having the least minimum combined errors,among the decimated grids, as optimal decimated grids.

BRIEF DESCRIPTION OF FIGURES

This disclosure is illustrated in the accompanying drawings, throughoutwhich like reference characters indicate corresponding parts in thevarious figures. The embodiments herein will be better understood fromthe following description with reference to the drawings, in which:

FIG. 1 illustrates a block diagram of an advanced scalable texturecompression (ASTC) encoder for selecting an optimal decimated grid,according to an embodiment as disclosed herein;

FIG. 2 is a flow diagram illustrating a method for selecting an optimalcolor endpoint mode and a block mode, according to an embodiment asdisclosed herein;

FIG. 3 is a flow diagram illustrating another method for selecting anoptimal color endpoint mode and a block mode, according to an embodimentas disclosed herein;

FIG. 4 illustrates an example scenario for selecting the optimaldecimated grid from an “8×8” block footprint, according to an embodimentas disclosed herein; and

FIG. 5 illustrates a computing environment implementing the method forselecting an optimal decimated grid in an encoder, according to anembodiment as disclosed herein.

DETAILED DESCRIPTION OF DISCLOSURE

The embodiments herein and the various features and advantageous detailsthereof are explained more fully with reference to the non-limitingembodiments that are illustrated in the accompanying drawings anddetailed in the following description. Descriptions of well-knowncomponents and processing techniques are omitted so as to notunnecessarily obscure the embodiments herein. Also, the variousembodiments described herein are not necessarily mutually exclusive, assome embodiments can be combined with one or more other embodiments toform new embodiments. The term “or” as used herein, refers to anon-exclusive or, unless otherwise indicated. The examples used hereinare intended merely to facilitate an understanding of ways in which theembodiments herein can be practiced and to further enable those skilledin the art to practice the embodiments herein. Accordingly, the examplesshould not be construed as limiting the scope of the embodiments herein.

The embodiments herein disclose a method for selecting an optimaldecimated grid in an encoder. The method includes estimating a weightdecimation error individually for each of a vertical decimated grid anda horizontal decimated grid from a plurality of decimated grids.Further, the method includes estimating a weight decimation error foreach of remaining decimated grids, from the plurality of decimatedgrids, based on a corresponding weight decimation error of the verticaldecimated grids and the horizontal decimated grids. Further, the methodincludes determining an initial combined error by combining the weightdecimation error and a color format choice error individually for eachof the decimated grids. Further, the method includes selecting at leasttwo decimated grids, from the plurality of decimated grids, having aminimum initial combined error as optimal decimated grids.

In an embodiment, the method further includes determining an actualweight decimation error and a quantization error for each of the optimaldecimated grids. Further, the method includes determining a finalcombined error by combining the actual weight decimation error, thequantization error and the color format choice error. Further, themethod includes estimating optimal color endpoint modes and block modesfor each of the optimal decimated grids, having a minimum final combinederror. Further, the method includes selecting an optimal color endpointmode and a block mode, from the optimal color endpoint modes and theblock modes, having a minimum reconstruction error.

In an embodiment, the encoder is an Adaptive Scalable TextureCompression (ASTC) encoder.

Another embodiment herein discloses a method for selecting the optimaldecimated grid in the encoder. The method includes estimating the weightdecimation error individually for each of the vertical decimated gridand the horizontal decimated grid from the plurality of decimated grids.Further, the method includes estimating a weight decimation error foreach of remaining decimated grids from the plurality of decimated gridsbased on corresponding weight decimation error of the vertical decimatedgrid and the horizontal decimated grid. Further, the method includescomputing a quantization error of each weight quantization level on anideal weight grid. Further, the method includes determining a combinederror by combining the weight decimation error, the color format choiceerror, and the quantization error for each of the decimated grids.Further, the method includes selecting at least two optimal colorendpoint modes and block modes, from the decimated grids, having theminimum combined error as optimal decimated grids.

In an embodiment, the method further includes selecting the optimalcolor endpoint mode and a block mode, from the optimal decimated grids,having the minimum reconstruction error.

In conventional systems, the ASTC encoder follows an iterative approachto select the best block mode. For selecting the best block mode, thebelow described steps are iteratively performed for all possibledecimated weight grid sizes and weight quantization levels:

-   -   a. Computing decimated weights from original weights,    -   b. Quantizing and un-quantizing the decimated weights for a        particular weight quantization level,    -   c. Infilling the un-quantized and decimated weights to an        original block size,    -   d. Computing a sum of scaled absolute difference errors (i.e.,        weight error) between infill weights and original weights, and    -   e. Selecting the best block mode with a minimum combined error,        where the combined error includes both the weight error and        color format choice.

Unlike the conventional systems and methods, the disclosure hereinprovides a low complexity block mode selection approach targeted forhigh-performance encoding applications. The disclosed method eliminatescomputation of the decimated weights for all the decimated grids, whichis a very complex process. Further, the proposed method eliminates theneed to quantize the decimated weights with all quantization levels andfor all decimated grids; and eliminates infilling of the decimatedweights to original block size for all decimated grids. With increasingblock sizes (i.e., from 4×4 to 12×12 as per ASTC specification), theproposed method is more advantageous where the complexity is reducedsignificantly in the best block mode selection for a given block size.

Referring now to the drawings, and more particularly to FIGS. 1 through5, where similar reference characters denote corresponding featuresconsistently throughout the figures, there are shown preferredembodiments.

FIG. 1 illustrates a block diagram of an Adaptive Scalable TextureCompression (ASTC) encoder for selecting an optimal decimated grid,according to an embodiment disclosed herein. ASTC encoder 100 includes auniformity and transparency determination unit 102, a partitionestimation unit 104, a color endpoint and weight estimation unit 106, adecimated weight and quantization estimation unit 108, a color endpointmode estimation unit 110, a color endpoint and weight refinement unit112, and a compression unit 114.

Raw image data, which is a texture map, is provided as an input to theuniformity and transparency determination unit 102. The uniformity andtransparency determination unit 102 checks for uniformity of texels inthe raw image data. If all texels have constant color, then theuniformity and transparency determination unit 102 sets an IsVoidExtentflag to “ON”. Further, the uniformity and transparency determinationunit 102 bypasses all the units to encode the block in the compressionunit 114. Further, if IsVoidExtent equals to zero, then the uniformityand transparency determination unit 102 sends the texels in the rawimage to the partition estimation unit 104.

The partition estimation unit 104 identifies the best partition patternfor a given block footprint. There are a maximum of 1024 predefinedpartition patterns for a given block footprint as specified in the ASTCstandard. Further, the partition estimation unit 104 applies a K-Meanclustering algorithm to group block texels into different partitions.Then, the extracted partition pattern from the K-means clustering iscompared to pre-defined partition patterns to select ‘N’ number of bestpartition patterns. Finally, the partition estimation unit 104 selects apartition pattern with the least partition error.

The color endpoint and weight estimation unit 106 selects a block modefor encoding. The texture map is divided into blocks of size, forexample, “12×12”, “8×8”, “4×4”, or the like. The selected block mode forencoding is known as the coded block. For each partition of texels, thecolor endpoint and weight estimation unit 106 computes ideal colorendpoints and texel weights. Further, the color endpoint and weightestimation unit 106 selects an “N×N” block for encoding and sends the“N×N” block to the decimated weight estimation unit 108. In anembodiment, the “N×N” block includes a plurality of grids. In anexample, the color endpoint and weight estimation unit 106 selects a“12×12” block for encoding. In another example, the color endpoint andweight estimation unit 106 selects an “8×8” block for encoding. Inanother example, the color endpoint and weight estimation unit 106selects a “4×4” block for encoding.

After receiving the “N×N” block for encoding, the decimated weight andquantization estimation unit 108 can be configured to estimate a weightdecimation error individually for each of a vertically decimated gridand a horizontal decimated grid from a plurality of decimated grids.Further, the decimated weight and quantization estimation unit 108 canbe configured to estimate a weight decimation error for each ofremaining decimated grids among the plurality of decimated grids basedon a corresponding weight decimation error of the vertical decimatedgrid and the horizontal decimated grid. Further, the decimated weightand quantization estimation unit 108 can be configured to determine aninitial combined error by combining the weight decimation error and acolor format choice error individually for each of the decimated grids.

In an embodiment, after estimating the weight decimation error for theplurality of decimated grids, the decimated weight and quantizationestimation unit 108 can be configured to select at least two bestpossible combinations with a minimum initial combined error as theoptimal decimated grids.

For the selected at least two decimated grids, the decimated weight andquantization estimation unit 108 can be configured to determine anactual weight decimation error and a quantization error for each of thedecimated grids. Further, the decimated weight and quantizationestimation unit 108 can be configured to send the determined actualweight decimation error and quantization error to the color endpointmode estimation unit 110. The color endpoint mode estimation unit 110can be configured to determine a final combined error by combining theactual weight decimation error, the quantization error, and color formatchoice error. Further, the color endpoint mode estimation unit 110 canbe configured to estimate optimal color endpoint modes and block modesfor each of the optimal decimated grids, having a minimum final combinederror. Further, the color endpoint and weight refinement unit 112 can beconfigured to select an optimal color endpoint mode and a block mode,from the optimal color endpoint modes and the block modes, having aminimum reconstruction error. The reconstruction error is obtained byperforming a decoding process on the optimal color endpoint mode and theblock mode. In the decoding process, reconstruction of all blocks texelsis accomplished by interpolation of un-quantized and in-filled decimatedweights and un-quantized color endpoints. The reconstruction error iscomputed between the reconstructed texels and original source texels.The color endpoint and weight refinement unit 112 determines the minimalreconstruction error by using conventional mechanisms. The best blockmode is selected such that compressed block bits should fit into afixed-number of 128 bits, with best possible quality and with minimumreconstruction error.

In an example, when the color endpoint and weight estimation unit 106selects “8×8” block for encoding, then the decimated weight andquantization estimation unit 108 can be configured to obtain thedecimated weight estimate as “5×6” block. The decimated weight estimate“5×6” block is a subset of an “8×8” block.

In another embodiment, the decimated weight and quantization estimationunit 108 can be configured to compute the quantization error of eachweight quantization level (i.e., 0 to 11) on an ideal weight grid (i.e.,without decimation). Further, the color endpoint mode estimation unit110 can be configured to select the at least two optimal color endpointmodes and block modes, from the optimal decimated grids, having theminimum final combined error by combining weight decimation error, thecolor format choice error, and the weight quantization error as theoptimal decimated grids. Further, the color endpoint and weightrefinement unit 112 can be configured to select an optimal colorendpoint mode and a block mode, from the optimal decimated grids, havinga minimum reconstruction error.

The color endpoint mode estimation unit 110 selects at least two bestcolor endpoint modes (CEM) & block modes based on a pre-defined 128-bitsand Min (Weight error [NB]+Color format choice error [CF]) criteria,where NB=0, 1, 2, 3 . . . number of blocks and CF=0, 1, 2, 3 . . .number of color formats, weight error=(weight decimation error+weightquantization error).

The color endpoint and weight refinement unit 112 identifies anefficient sampling in the ASTC encoder 100. The identification of theefficient sampling point is performed at a final operational stage ofthe color endpoint and weight refinement unit 112. This selectioncriteria is compressed information of a selected combination and shouldbe fit into a fixed 128-bits with the best possible quality out ofselected at least two combinations of block mode and color endpointmodes (CEM) for each block.

The Compression unit 114 finally packs quantized weight, quantized colorendpoint data and block level control information like block mode,partition information, and CEM configuration to form 128-bit compresseddata.

FIG. 1 shows a limited overview of the ASTC encoder 100 but, it is to beunderstood that other embodiments are not limited thereto. Further, theASTC encoder 100 can include any number of units communicating amongeach other.

FIG. 2 is a flow diagram illustrating a method 200 for selecting theoptimal color endpoint mode and a block mode, according to an embodimentas disclosed herein. At step 202, the method 200 includes estimating aweight decimation error individually for each of a vertical decimatedgrid and a horizontal decimated grid from a plurality of decimatedgrids. The method 200 allows the decimated weight and quantizationestimation unit 108 to estimate the weight decimation error individuallyfor each of the vertical decimated grid and the horizontal decimatedgrid from the plurality of decimated grids.

At step 204, the method 200 includes estimating a weight decimationerror for each of the remaining decimated grids among the plurality ofdecimated grids based on a corresponding weight decimation error of thevertical decimated grid and the horizontal decimated grid. The method200 allows the decimated weight and quantization estimation unit 108 toestimate the weight decimation error for each of the remaining decimatedgrids among the plurality of decimated grids based on the correspondingweight decimation error of the vertical decimated grid and thehorizontal decimated grid.

At step 206, the method 200 includes determining a combined error bycombining the weight decimation error and a color format choice errorindividually for each of the decimated grids. The method 200 allows thedecimated weight and quantization estimation unit 108 to determine thecombined error by combining the weight decimation error and the colorformat choice error individually for each of the decimated grids.

At step 208, the method 200 includes selecting at least two decimatedgrids, from the plurality of decimated grids, having the minimumcombined error as optimal decimated grids. The method 200 allows thedecimated weight and quantization estimation unit 108 to select the atleast two decimated grids, from the plurality of decimated grids, havingthe minimum combined error as the optimal decimated grids.

At step 210, the method 200 determines an actual weight decimation errorand a quantization error for each of the optimal decimated grids. Themethod 200 allows the decimated weight and quantization estimation unit108 to determine the actual weight decimation error and the quantizationerror for each of the optimal decimated grid. At step 212, the method200 includes determining a final combined error by combining the actualweight decimation error, the quantization error, and a color formatchoice error. The method 200 allows the color endpoint mode estimationunit 110 to determine the final combined error by combining the actualweight decimation error, the quantization error, and the color formatchoice errors.

At step 214, the method 200 includes estimating optimal color endpointmodes and block modes (i.e., decimated grid and quantization level) foreach of the optimal decimated grids. The method 200 allows the colorendpoint mode estimation unit 110 to estimate the optimal color endpointmodes and the block modes (i.e., decimated grid and quantization level)for each of the optimal decimated grids. At step 216, the method 200includes selecting an optimal color endpoint mode and the block mode,from the optimal color endpoint modes and the block modes, having theminimum reconstruction error. The method 200 allows the color endpointand weight refinement unit 112 to select the optimal color endpoint modeand the block mode, from the optimal color endpoint modes and the blockmodes, having the minimum reconstruction error. Further, the examplescenario of an “8×8” block footprint is explained in conjunction withthe FIG. 4.

The various actions, acts, blocks, steps, or the like in the method 200may be performed in the order presented, in a different order orsimultaneously. Further, in some embodiments, some of the actions, acts,blocks, steps, or the like may be omitted, added, modified, skipped, orthe like without departing from the scope of the disclosure.

FIG. 3 is another flow diagram illustrating a method 300 for selecting acolor endpoint mode and a block mode, according to an embodiment asdisclosed herein. At step 302, the method 300 includes estimating aweight decimation error individually for each of a vertical decimatedgrid and a horizontal decimated grid from a plurality of decimatedgrids. The method 300 allows the decimated weight and quantizationestimation unit 108 to estimate the weight decimation error individuallyfor each of the vertical decimated grid and the horizontal decimatedgrid from the plurality of decimated grids.

At step 304, the method 300 includes estimating a weight decimationerror for each of the remaining decimated grids among the plurality ofdecimated grids based on a corresponding weight decimation error of thevertical decimated grid and the horizontal decimated grid. The method300 allows the decimated weight and quantization estimation unit 108 toestimate the weight decimation error for each of the remaining decimatedgrids among the plurality of decimated grids based on correspondingweight decimation error of the vertical decimated grid and thehorizontal decimated grid.

At step 306, the method 300 includes computing a quantization error ofeach weight quantization level on an ideal weight grid. The method 300allows the decimated weight and quantization estimation unit 108 tocompute the quantization error of each weight quantization level on theideal weight grid. At step 308, the method 300 includes determining acombined error by combining the weight decimation error, a color formatchoice error, and the quantization error for each of the decimatedgrids. The method 300 allows the color endpoint mode estimation unit 110to determine the combined error by combining the weight decimationerror, the color format choice error, and the quantization error foreach of the decimated grid.

At step 310, the method 300 includes selecting at least two optimalcolor endpoint modes and block modes, from the decimated grids, having aminimum combined error as optimal decimated grids. The method 300 allowsthe color endpoint mode estimation unit 110 to select the at least twooptimal color endpoint modes and the block modes, from the decimatedgrids, having the minimum combined error as the optimal decimated grids.At step 312, the method 300 includes selecting an optimal color endpointmode and a block mode, from the optimal decimated grids, having aminimum reconstruction error as the optimum decimated grid. The method300 allows the color endpoint and weight refinement unit 112 to selectthe optimal decimated grid, from the optimal decimated grids, having theminimum reconstruction error. Further, an example scenario of an “8×8”block footprint is explained in conjunction with the FIG. 4.

The various actions, acts, blocks, steps, or the like in the method 300may be performed in the order presented, in a different order, orsimultaneously. Further, in some embodiments, some of the actions, acts,blocks, steps, or the like may be omitted, added, modified, skipped, orthe like without departing from the scope of the disclosure.

FIG. 4 illustrates an example scenario for selecting an optimaldecimated grid from an “8×8” block footprint, according to an embodimentdisclosed herein. FIG. 4 shows an “8×8” block footprint, where notation“a” represents a horizontally decimated grid as shown in Table-1 andnotation “b” represents a vertically decimated grid as shown in Table-2.

TABLE 1 8 × 2 8 × 3 8 × 4 8 × 5 8 × 6 8 × 7

TABLE 2 2 × 8 3 × 8 4 × 8 5 × 8 6 × 8 7 × 8

Scheme-1: The decimated weight and quantization estimation unit 108computes a weight decimation error (wdErr) for the vertically decimatedgrid as shown in Table-3 and a horizontally decimated grid as shown inTable-4.

TABLE 3 wdErr wdErr wdErr wdErr wdErr wdErr (8 × 2) (8 × 3) (8 × 4) (8 ×5) (8 × 6) (8 × 7)

TABLE 4 wdErr wdErr wdErr wdErr wdErr wdErr (2 × 8) (3 × 8) (4 × 8) (5 ×8) (6 × 8) (7 × 8)

Further, the decimated weight and quantization estimation unit 108 canbe configured to estimate a weight decimation error for each ofremaining decimated grids from a plurality of decimated grids based on acorresponding weight decimation error of the vertical decimated grid andthe horizontal decimated grid. For example, for the remaining decimatedgrid “7×5”, the weight decimation error is determined by using theequation:

wdErr(7×5)≈X _(h) *wdErr(7×8)+X _(v) *wdErr(8×5),

where X_(v) and X_(h) are weight factors on error.

Similarly, the remaining decimated grids are also determined. In anembodiment, after estimating the weight decimation error for thedecimated grids, the decimated weight and quantization estimation unit108 can be configured to select at least two best possible combinations(i.e., decimated grids) with a minimum combined error of the weightdecimation error and a color format choice error. For the selected atleast two (for example, 4) decimated grids, the decimated weight andquantization estimation unit 108 can be configured to determine anactual weight decimation error and a quantization error for each of theat least two decimated grids. Further, the color endpoint modeestimation unit 110 can be configured to determine a final combinederror by combining the actual weight decimation error, the quantizationerror, and the color format choice error.

Further, the color endpoint mode estimation unit 110 can be configuredto estimate the optimal color endpoint modes and block modes for each ofthe optimal decimated grids. Further, the color endpoint and weightrefinement unit 112 can be configured to select the optimal colorendpoint mode and the block mode (i.e., the decimated grid and thequantization level) having the minimum reconstruction error.

Scheme-2: The decimated weight and quantization estimation unit 108computes a weight decimation error (wdErr) for a vertically decimatedgrid as shown in Table-3 and a horizontally decimated grid as shown inTable-4. Further, decimated weight and quantization estimation unit 108determines a quantization error of all weight quantization levels (i.e.,0 to 11) on an ideal weight grid (i.e., without decimation) as shown inTable-5.

TABLE 5 w_(q)Err w_(q)Err w_(q)Err — w_(q)Err (Q₁) (Q₂) (Q₃) (Q₁₁)

After determining the quantization error, the decimated weight andquantization estimation unit 108 estimates remaining decimated gridsfrom a plurality of grids and the quantization error. For the remainingdecimated grid “7×5”, for example, the overall weight error isdetermined by using the below equation:

wErr(7×5)≈(X _(h) *wdErr(7×8)+X _(v) *wdEri(8×5))+wqErr(Q ₄),

where X_(h) & X_(v) are weight factors on error.

Similarly, the remaining decimated grids are also determined. Further,the color endpoint mode estimation mode 110 can be configured to selectat least two optimal color endpoint modes and block modes, from theoptimal decimated grids, having the minimum final combined error by acombining weight decimation error, a color format choice error, and theweight quantization error as the optimal decimated grids. Further, thecolor endpoint and weight refinement unit 112 can be configured toselect an optimal color endpoint mode and the block mode, from theoptimal decimated grids, having the minimum reconstruction error.

In an embodiment, below Table-6 describes a complexity reduction forMethod-1 and Method-2 for an “8×8” block foot print.

TABLE 6 Scheme-1 Scheme-2 Total valid Total valid Computed EstimatedComputed Estimated Block block decimated decimated decimatedQuantization & decimated decimated Quantization & footprint modes gridsgrids modes un-quantization grids modes un-quantization 8 × 8 555 3912 + N (27 − N) N*12 12 27 12

FIG. 5 illustrates a computing environment implementing the method forselecting an optimal decimated grid in an encoder, according to theembodiments disclosed herein. As depicted, the computing environment 502comprises at least one processing unit 508 that is equipped with acontrol unit 504 and an Arithmetic Logic Unit (ALU) 506, a memory 510, astorage unit 512, plurality of networking devices 516 and a pluralityInput output (I/O) devices 514. The processing unit 508 is responsiblefor processing the instructions of the algorithm. The processing unit508 receives commands from the control unit 504 in order to perform itsprocessing. Further, any logical and arithmetic operations involved inthe execution of the instructions are computed with the help of the ALU506.

The overall computing environment 502 can be composed of multiplehomogeneous and/or heterogeneous cores, multiple CPUs of differentkinds, special media and other accelerators. The processing unit 508 isresponsible for processing the instructions of the algorithm. Further,the plurality of processing units 508 may be located on a single chip orover multiple chips.

The algorithm comprising instructions and codes required for theimplementation are stored in either the memory unit 510 or the storage512 or both. At the time of execution, the instructions may be fetchedfrom the corresponding memory 510 and/or storage 512, and executed bythe processing unit 508.

In case of any hardware implementations, various networking devices 516or external I/O devices 514 may be connected to the computingenvironment to support the implementation through the networking unitand the I/O device unit.

The embodiments disclosed herein can be implemented through at least onesoftware program running on at least one hardware device and performingnetwork management functions to control the elements. The elements shownin FIGS. 1 and 5 include blocks which can be at least one of a hardwaredevice, or a combination of hardware device and software module.

As is traditional in the field, embodiments may be described andillustrated in terms of blocks which carry out a described function orfunctions. These blocks, which may be referred to herein as units ormodules or the like, are physically implemented by analog and/or digitalcircuits such as logic gates, integrated circuits, microprocessors,microcontrollers, memory circuits, passive electronic components, activeelectronic components, optical components, hardwired circuits and thelike, and may optionally be driven by firmware and/or software. Thecircuits may, for example, be embodied in one or more semiconductorchips, or on substrate supports such as printed circuit boards and thelike. The circuits constituting a block may be implemented by dedicatedhardware, or by a processor (e.g., one or more programmedmicroprocessors and associated circuitry), or by a combination ofdedicated hardware to perform some functions of the block and aprocessor to perform other functions of the block. Each block of theembodiments may be physically separated into two or more interacting anddiscrete blocks without departing from the scope of the disclosure.Likewise, the blocks of the embodiments may be physically combined intomore complex blocks without departing from the scope of the disclosure.

The foregoing description of the specific embodiments will so fullyreveal the general nature of the embodiments herein that others can, byapplying current knowledge, readily modify and/or adapt for variousapplications such specific embodiments without departing from thegeneric concept, and, therefore, such adaptations and modificationsshould and are intended to be comprehended within the meaning and rangeof equivalents of the disclosed embodiments. It is to be understood thatthe phraseology or terminology employed herein is for the purpose ofdescription and not of limitation. Therefore, while the embodimentsherein have been described in terms of preferred embodiments, thoseskilled in the art will recognize that the embodiments herein can bepracticed with modification within the spirit and scope of theembodiments as described herein.

What is claimed is:
 1. A method, executed by an encoding circuit, forselecting an optimal decimated grid, the method comprising: estimating,among a plurality of decimated grids within a coded block, a weightdecimation error for each of a vertical decimated grid and a horizontaldecimated grid; estimating a weight decimation error for each ofremaining decimated grids among the plurality of decimated grids basedon a corresponding weight decimation error among the vertical decimatedgrid and the horizontal decimated grid; determining, for each of theplurality of decimated grids, an initial combined error by combining theweight decimation error and a color format choice error; and selectingtwo decimated grids having the least initial combined errors, among theplurality of decimated grids, as optimal decimated grids.
 2. The methodof claim 1, further comprising determining an actual weight decimationerror and a quantization error for each of the optimal decimated grids.3. The method of claim 2, further comprising, for each of the optimaldecimated grids, determining a final combined error by combining theactual weight decimation error, the quantization error, and the colorformat choice error.
 4. The method of claim 3, further comprisingestimating, for each of the optimal decimated grids, optimal colorendpoint modes and block modes having a minimum final combined error. 5.The method of claim 4, further comprising selecting, from the optimalcolor endpoint modes and the block modes, an optimal color endpoint modeand a block mode having a minimum reconstruction error.
 6. The method ofclaim 5, further comprising packing the selected optimal color endpointdata and selected block mode and a quantized weight, information of apartition pattern, and a color endpoint mode (CEM) configurationcorresponding to the selected optimal color endpoint data and theselected block mode to form 128-bit compressed data.
 7. The method ofclaim 1, further comprising dividing a texture map into the coded blockof grid-size N×N, where N is an integer greater than one.
 8. The methodof claim 6, further comprising selecting the partition pattern, among aplurality of identified partition patterns, having the least partitionerror.
 9. The method of claim 8, further comprising: applying a K-meanclustering algorithm to group block texels of a texture map intodifferent partitions, and comparing the different partitions topre-defined partition patterns to select N best partition patterns asthe plurality of identified partition patterns, where N is an integergreater than one.
 10. An encoder for selecting an optimal decimatedgrid, the encoder comprising: a decimated weight and quantizationestimation circuit that: estimates, among a plurality of decimated gridswithin a coded block, a weight decimation error for each of a verticaldecimated grid and a horizontal decimated grid; estimates a weightdecimation error for each of remaining decimated grids, among theplurality of decimated grids, based on a corresponding weight decimationerror among the vertical decimated grid and the horizontal decimatedgrid; determines, for each of the decimated grids, an initial combinederror by combining the weight decimation error and a color format choiceerror; and selects two decimated grids having the minimum initialcombined errors, among the plurality of decimated grids, as optimaldecimated grids.
 11. The encoder of claim 10, wherein the decimatedweight and quantization estimation circuit determines an actual weightdecimation error and a quantization error for each of the optimaldecimated grids.
 12. The encoder of claim 11, further comprising a colorendpoint mode estimation circuit that: determines, for each of theoptimal decimated grids, a final combined error by combining the actualweight decimation error and the quantization error; and estimates, foreach of the optimal decimated grids, optimal color endpoint modes andblock modes having the minimum final combined error.
 13. The encoder ofclaim 12, further comprising a color endpoint and weight refinementcircuit that selects an optimal color endpoint mode and a block mode,among the optimal color endpoint modes and the block modes, having aminimum reconstruction error.
 14. The encoder of claim 13, furthercomprising a compression circuit that packs the selected optimal colorendpoint data and selected block mode and a quantized weight,information of a partition pattern, and a color endpoint mode (CEM)configuration corresponding to the selected optimal color endpoint dataand the selected block mode to form 128-bit compressed data.
 15. Theencoder of claim 10, further comprising a color endpoint and weightestimation circuit that divides a texture map into the coded block ofgrid-size N×N, where N is an integer greater than one.
 16. The encoderof claim 15, further comprising a partition estimation circuit thatselects a partition pattern, among a plurality of identified partitionpatterns, having the least partition error.
 17. The encoder of claim 16,wherein the partition estimation circuit: applies a K-mean clusteringalgorithm to group block texels of a texture map into differentpartitions, and compares the different partitions to pre-definedpartition patterns to select N best partition patterns as the pluralityof identified partition patterns, where N is an integer greater thanone.
 18. A method, executed by an encoder circuit, for selecting anoptimal decimated grid, the method comprising: estimating, with adecimated weight and quantization estimation circuit, a weightdecimation error for each of a vertical decimated grid and a horizontaldecimated grid among a plurality of decimated grids; estimating, withthe decimated weight and quantization estimation circuit, a weightdecimation error for each of remaining decimated grids, among theplurality of decimated grids, based on a corresponding weight decimationerror among the vertical decimated grid and the horizontal decimatedgrid; computing, with the decimated weight and quantization estimationcircuit, a quantization error of each weight quantization level on anideal weight grid; determining, with a color endpoint mode estimationcircuit, a combined error by combining the weight decimation error, acolor format choice error, and the quantization error for each thedecimated grids; and selecting, with the color endpoint mode estimationcircuit, two optimal color endpoint modes and block modes having theleast minimum combined errors, among the decimated grids, as optimaldecimated grids.
 19. The method of claim 18, further comprisingselecting, with a color endpoint and weight refinement circuit, anoptimal color endpoint mode and a block mode, among the optimaldecimated grids, having a minimum reconstruction error.
 20. The methodof claim 18, wherein the encoder is an Adaptive Scalable TextureCompression (ASTC) encoder.